<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="UTF-8">
    <title>搜索</title>
    <link rel="stylesheet" href="/css/search.css"  type="text/css" />
</head>
<body>
<div id="searchweb">
    <div class="head">
        <div class="s_form">
            <a href="/" id="result_logo" onmousedown="return c({'fm':'tab','tab':'logo'})"><img src="/img/yingoo.jpg" alt="到首页" ></a>
            <form  class="fm" id = "form" method="post" action="/search">
                <span class="bg s_ipt_wr quickdelete-wrap">
                    <span class="soutu-btn"></span>
                    <div id="kw_tip" style="width: initial; display: none;" unselectable="on" onselectstart="return false;" class="s_ipt_tip"></div>
                    <input id="kw" name="keyword" class="s_ipt" value="${keyword}" maxlength="255" autocomplete="off">
                    <input  name="pageNo" type="hidden"  id="pageNo"/>
                    <a href="javascript:;" id="quickdelete" title="清空" class="quickdelete" style="top: 0px; right: 0px; display: block;"></a>
                </span>
                <span class="bg s_btn_wr">
                    <input type="submit" id="su" value="搜索" class="btn self-btn bg s_btn"></span>
            </form>
        </div>
        <div class="tap">
        </div>
    </div>
    <c:if test="${totalCount<=0}">
        <div class="content_none">
            <div class="nors" >
                <p>很抱歉，没有找到</p>
                <br>
                <div class="tip_head">温馨提示：</div>
                <ul><li>尽量将关键词拆成生活中常见的词语，不同的词语用空格隔开</li>
                    <li>或者搜索其他关键字组合</li>
                </ul>
            </div>
        </div>
    </c:if>
    <div class="searchListOne">
        <ul>
            <c:forEach var="document" items="${documentInfos}">
                <li>
                    <div>
                        <h3> <a target="_blank" href="${document.path}">${document.title}</a></h3>
                        <p>${document.date}</p>
                    </div>
                    <p class="source">
                        时间：<span>${document.createTime}</span>
                        <c:forEach var="keyfreq" items="${document.keyWordFreque}">
                        关键词：<span>${keyfreq.keyword}</span>
                        词频：<span>${keyfreq.freque}</span>
                        </c:forEach>
                        <br>
                        <c:forEach var="bookName" items="${document.bookNames}">
                            <font color='red'>${bookName}</font>&nbsp;
                        </c:forEach>
                    </p>
                </li>
            </c:forEach>

        </ul>
    </div>
    <c:if test="${totalCount>0}">
        <div class="long-pages">
            <a href="javascript:go(${curentPage-1});">上一页</a>
            &nbsp;&nbsp;&nbsp;
            <strong>${curentPage}</strong>
            &nbsp;&nbsp;&nbsp;
            <a href="javascript:go(${curentPage+1});">下一页</a>
            &nbsp;&nbsp;&nbsp;
            <strong>  共${totalPage}页</strong>
        </div>
    </c:if>
</div>
<script src="/js/search.js" language="JavaScript"></script>
</body>
</html>